Votre package a besoin de ces 4 choses, la dernière va vous surprendre 😱 !
Ne jamais commit une erreur
Tester dans les meilleures conditions
Configuration du pyproject.toml
Créer la meilleure documentation
Parlons style de code !
def add_nums( A ,B):return A+B
def add_nums( A ,B):return A+Bimport numpy as npdef add_nums_numpy( A ,B):return np.sum([A, B])
def add_nums( A ,B):return A+Bimport numpy as npdef add_nums_numpy( A ,B):return np.sum([A, B])def divideNums( A , B):return A/Bdef multiply(a,b ):return a *b
def add_nums( A ,B):return A+Bimport numpy as npdef add_nums_numpy( A ,B):return np.sum([A, B])def divideNums( A , B):return A/Bdef multiply(a,b ):return a *bdef main( ) : x= add_nums(2, 3) #some comment y=multiply( x ,4 ) # in the middle of the seaprint( "sum:",x )print("product:" , y)
import numpy as npdef add_nums(A, B):return A + Bdef add_nums_numpy(A, B):return np.sum([A, B])def divideNums(A, B):return A / Bdef multiply(a, b):return a * bdef main(): x = add_nums(2, 3)# some comment y = multiply(x, 4) # in the middle of the seaprint("sum:", x)print("product:", y)